<template>
<view>
<!-- 自定义组件 -->
    <block v-if="block_model">
        <!--<import src="../../index/custom/custom.wxml"></import>-->
        <block data-type="template" data-is="custom" data-attr="block_model:block_model,url:url,countDownList:countDownList,search:search,scrollTop:scrollTop,wap_home_logo:wap_home_logo,iflogin:iflogin,goods_show:goods_show,goods_show_fid:goods_show_fid,video:video,shop_list:shop_list,ad:ad,content:content,custom_skill_status:custom_skill_status,intelligence_date,from_address">
  <block v-if="search">
    <!-- 搜索栏 -->
    <view class="search_contain" v-if="search.block_type == 8">
      <!-- 搜索栏1 -->
      <view :class="'search_st1 search-box ' + (scrollTop>10?'search-fixed':'')" v-if="search.search_style ==0" style="padding-top:15rpx;">
        <view>
          <navigator url class="tpd-logo">
            <image :class="'wh100 ' + (scrollTop>10?'bg-logo':'')" :src="wap_home_logo"></image>
          </navigator>
          <view :class="'search-input ' + (scrollTop>10?'bg-input':'')" :style="'width:' + (iflogin?'710rpx':'660rpx') + 'background:#fffborder-radius:100rpx'">
            <image class="ico-search" src="/static/images/search.png"></image>
            <input type="text" :style="'width:' + (iflogin?'464':'400') + 'rpx'" placeholder="请输入您所搜索的商品" @focus="jumpSearch"></input>
          </view>
          <!-- <navigator url='' class="tpd-personal-warp">
                <text hidden='{{iflogin}}' class="{{scrollTop>10?'bg-fonts':''}}" catchtap='tologin'>登录</text>
                <view class="ico-head-personal"><image src='/images/logo.png'></image></view>
            </navigator> -->
        </view>
      </view>

      <!-- 搜索栏2 -->
      <view :class="'search_st2 search-box ' + (scrollTop>10?'search-fixed':'')" v-if="search.search_style == 1">
        <view>
          <view :class="'search-input ' + (scrollTop>10?'bg-input':'')">
            <image class="ico-search" src="/static/images/search.png"></image>
            <input type="text" placeholder="请输入您所搜索的商品" @focus="jumpSearch"></input>
          </view>
        </view>
      </view>
      <!-- 搜索栏3 -->
      <view :class="'search_st3 search-box ' + (scrollTop>10?'search-fixed':'')" v-if="search.search_style == 2">
        <view style="margin:15rpx 20rpx;background:#fff;">
          <!-- <navigator url='' class="tpd-logo">
            <image class="wh100 {{scrollTop>10?'bg-logo':''}}" src="{{url + wap_home_logo}}"></image>
          </navigator> -->
          <view :class="'search-input ' + (scrollTop>10?'bg-input':'')" :style="'width:' + (iflogin?'700':'660') + 'rpxbackground:#fff'">
            <image class="ico-search" src="/static/images/search.png"></image>
            <input type="text" :style="'width:' + (iflogin?'464':'400') + 'rpx'" placeholder="请输入您所搜索的商品" @focus="jumpSearch"></input>
          </view>
          <!-- <navigator url='' class="tpd-personal-warp"> -->
            <!-- <text  hidden='{{iflogin}}' class="{{scrollTop>10?'bg-fonts':''}}" catchtap='tologin'>登录</text> -->
<!--             <view class="ico-head-personal">
              <image src='/images/logo.png'></image>
            </view>
          </navigator> -->
        </view>
      </view>
      <!-- 搜索栏4 -->
      <view :class="'search_st4 search-box ' + (scrollTop>10?'search-fixed':'')" v-if="search.search_style == 3">
        <view>
          <view class="search-input1">
            <image class="ico-search" src="/static/images/search.png"></image>
            <input type="text" placeholder="请输入您所搜索的商品" @focus="jumpSearch"></input>

          </view>
        </view>
        <!-- <navigator url='../../location/location?crt={{search.currentCity}}'>
          <text>{{search.currentCity}}</text>
          <image src='../../../images/ico-pt4.png'></image>
        </navigator> -->
      </view>

      <view :class="'search_st3 search-box ' + (scrollTop>10?'search-fixed':'')" v-if="search.search_style == 4">
        <view style="margin:10rpx 20rpx;background:#fff;border-radius:30rpx;">
<!--           <navigator url='' class="tpd-logo">
            <image class="wh100 {{scrollTop>10?'bg-logo':''}}" src="{{url + wap_home_logo}}"></image>
          </navigator> -->
          <view :class="'search-input ' + (scrollTop>10?'bg-input':'')" :style="'width:' + (iflogin?'700':'660') + 'rpxbackground:#fffborder-radius:30rpx'">
            <image class="ico-search" src="/static/images/search.png"></image>
            <input type="text" :style="'width:' + (iflogin?'464':'400') + 'rpx'" placeholder="请输入您所搜索的商品" @focus="jumpSearch"></input>
          </view>
          <!-- <navigator url='' class="tpd-personal-warp"> -->
            <!-- <text  hidden='{{iflogin}}' class="{{scrollTop>10?'bg-fonts':''}}" catchtap='tologin'>登录</text> -->
<!--             <view class="ico-head-personal">
              <image src='/images/logo.png'></image>
            </view>
          </navigator> -->
        </view>
      </view>

    </view>
  </block>


  <block v-for="(item, index) in block_model" :key="index">

    <!-- 海报 -->
    <view class="posters" v-if="item.block_type == 0" @tap.stop="topage" :data-type="item['url_type']" :data-id="item['app_url']" :data-url="item['url']">
      <image class="posters_img" v-if="item.height_style == 0" :src="url + item.pic" mode="widthFix"></image>
      <image class="posters_img" v-if="item.height_style == 1" :src="url + item.pic" mode="widthFix"></image>
    </view>

    <!-- 轮播广告 -->
    <view class="banners" v-if="item.block_type == 1" :style="'margin-bottom: ' + (item.spacing*2) + 'rpx'">
      <swiper indicator-dots="true" autoplay="true" interval="3000" duration="1000">
        <block v-for="(item, index2) in item.nav" :key="index2">
          <swiper-item @tap.stop="topage" :data-type="item.url_type" :data-id="item.app_url" :data-url="item.url">
            <image :src="url + item.pic" class="sviewde-image"></image>
          </swiper-item>
        </block>
      </swiper>
    </view>
    <!-- 快捷入口 -->
    <view v-if="item.block_type == 2">
      <!-- 5入口 -->
      <view :class="'section ' + (item.shape_type ==1 ?'imgstyle':'')" :style="'height:autopadding-bottom: ' + (item.spacing*2) + 'rpxbackground-color:' + item.diy_bg_color">
        <view :class="(item.nav.length == 3 ? 'flex-wrp3' :item.nav.length == 4?'flex-wrp4':'flex-wrp5') + ' tpdm-navstyle-circle'" :style="'flex-direction:rowbackground-color:' + item.diy_bg_color">
          <block v-for="(items, idx) in item.nav" :key="idx">
            <view class="flex-item" @tap.stop="topage" :data-url="items['url']" :data-type="items['url_type']" :data-id="items['app_url']">
              <image :src="url + items.pic"></image>
              <text>{{items.title_name}}</text>
            </view>
          </block>
        </view>
      </view>
    </view>
    <!-- 商品列表 -->
    <view class="container " v-if="item.block_type == 3" :style="'margin-bottom: ' + (item.spacing*2) + 'rpxpadding-bottom:0rpx'">
      <view class="tpdm-gdstyle">
        <view class="tpdm-goods-nav" :hidden="item.name_show == 1 ? false:true">
          <block v-for="(items, idx) in item.nav" :key="idx">
            <text :class="'goods-nav-list  ' + (idx == (item.title_selected?item.title_selected:0)?'choosetab':'')" :data-fid="index" :data-index="idx" :style="'color:' + (idx == (item.title_selected?item.title_selected:0)?'red':'') + '' + (item.nav.length >3 ? 'width:15%' : 'width:33%') + ''" @tap.stop="changeGoodsShow">{{items.tab_title}}</text>
          </block>
        </view>
        <!-- 橱窗式 -->
        <view class="tpdm-goods-list tpdm-goods-list1" v-if="item.show_type == 0">
          <view class="tpdm-goods-wrap clearfix">
            <block v-if="item.list.length == 0">
              <view class="not-data-text">暂无上传商品哦~~</view>
            </block>
            <block v-for="(items, idx) in item.list" :key="idx">

              <navigator class="tpdm-goods-lis" :url="'../../goods/goodsInfo/goodsInfo?goods_id=' + items.goods_id">
                <navigator class="tpdm-goods-pic" :url="'../../goods/goodsInfo/goodsInfo?goods_id=' + items.goods_id" href="javascript:;">
                  <view class="h-label" v-if="items.label_name" style="background: url(/images/h-label.png) no-repeat;background-size:175rpx 40rpx;">{{items.label_name}}</view>
                  <image :src="url + items.original_img"></image>
                </navigator>

                <navigator href="javascript:;" class="tpdm-goods-name">{{items.goods_name}}</navigator>
                <text class="lb-name" v-if="items.label_name">{{items.label_name}}</text>
                <view class="tpdm-goods-des">
                  <view class="tpdm-goods-price">
                    <view class="tg-sm">￥</view>{{items.shop_price}}</view>
                  <!-- <navigator class="tpdm-goods-like" href="javascript:;">已售{{(items.sales_sum * 1) + items.virtual_sales_sum}}件</navigator> -->
                </view>

              </navigator>
            </block>
          </view>
        </view>
        <!-- 列表式 -->
        <view class="tpdm-goods-list tpdm-goods-list2" v-if="item.show_type == 1">
          <block v-if="item.list.length == 0">
            <view class="not-data-text">暂无上传商品哦~~</view>
          </block>
          <view v-for="(items, idx) in item.list" :key="idx" class="tpdm-goods-wrap clearfix">
            <navigator class="tpdm-goods-lis" :url="'../../goods/goodsInfo/goodsInfo?goods_id=' + items.goods_id">
              <navigator class="tpdm-goods-pic" :url="'../../goods/goodsInfo/goodsInfo?goods_id=' + items.goods_id" href="javascript:;">
                <view class="h-label" v-if="items.label_name" style="background: url(/images/h-label.png) no-repeat;background-size:175rpx 40rpx;">{{items.label_name}}</view>
                <image :src="url + items.original_img"></image>
              </navigator>
              <navigator href="javascript:;" class="tpdm-goods-name">{{items.goods_name}}</navigator>
              <text class="lb-name lst-lb" v-if="items.label_name">{{items.label_name}}</text>
              <view class="tpdm-goods-des">
                <view class="tpdm-goods-price">
                  <view class="tg-sm">￥</view>{{items.shop_price}}</view>

              </view>
              <!-- <navigator href="javascript:;" class="tpdm-goods-nametwo">已售 {{(items.sales_sum * 1) + items.virtual_sales_sum }}件</navigator> -->
            </navigator>
          </view>
        </view>
        <!-- 海报式 -->
        <view class="tpdm-goods-list tpdm-goods-list3" v-if="item.show_type == 2">
          <block v-if="item.list.length == 0">
            <view class="not-data-text">暂无上传商品哦~~</view>
          </block>
          <view v-for="(items, idx) in item.list" :key="idx" class="tpdm-goods-wrap clearfix">

            <navigator class="tpdm-goods-lis" :url="'../../goods/goodsInfo/goodsInfo?goods_id=' + items.goods_id">
              <navigator class="tpdm-goods-pic" :url="'../../goods/goodsInfo/goodsInfo?goods_id=' + items.goods_id" href="javascript:;">
                <view class="h-label" v-if="items.label_name" style="background: url(/images/h-label.png) no-repeat;background-size:175rpx 40rpx;">{{items.label_name}}</view>
                <image :src="url + items.original_img"></image>
              </navigator>
              <navigator href="javascript:;" class="tpdm-goods-name">{{items.goods_name}}</navigator>
              <view class="tpdm-goods-des">
                <view class="tpdm-goods-price">￥{{items.shop_price}}</view>
                <!-- <navigator href="javascript:;" style="font-size:28rpx;float:right;text-align:center;color:#999;height:48rpx;line-height:48rpx;" class="">已售{{(items.sales_sum * 1) + items.virtual_sales_sum }}件</navigator> -->
              </view>
            </navigator>
          </view>
        </view>
      </view>
    </view>
    <!-- 营销活动 -->
    <view class="tpdm-acstyle " :style="'margin-bottom: ' + (item.spacing*2) + 'rpx'" v-if="item.block_type == 6">
      <!-- 拼团 -->
      <view v-if="item.activity_type == 0 && item.team_list.length >0">
        <!-- 橱窗式 -->
        <view class="tpdm-activity-title" v-if="item.tab_type == 1">{{item.tab_title}}</view>

        <view class="tpdm-goods-list tpdm-goods-list1" v-if="item.show_type == 0">
          <view class="tpdm-goods-wrap clearfix" id="nxkhh">
            <block v-for="(items, idx) in item.team_list" :key="idx">
              <view class="tpdm-goods-lis">
                <navigator class="tpdm-goods-pic" href="javascript:;">
                  <image :src="url + items.share_img"></image>
                </navigator>
                <navigator href="javascript:;" class="tpdm-goods-name">{{items.act_name}}</navigator>
                <view class="tpdm-goods-des">
                  <view class="tpdm-goods-price">￥{{items.team_price}}</view>
                  <view class="tpdm-sold-num">单买:￥{{items.goods.shop_price}}</view>
                </view>
                <view class="tpdm-goods-mes">
                  <navigator :url="'../../team/team_info/team_info?goods_id=' + items.goods_id + '&item_id=' + items.item_id + '&team_id=' + items.team_id" class="text-mes-a" href="javascript:;">去拼单 ></navigator>
                  <view class="text-mes-span">{{items.needer}}人团</view>
                  <view class="tpdm-acbuyer">
                    <image src></image>...</view>
                </view>
              </view>
            </block>
          </view>
        </view>

        <!-- 列表式 -->
        <view class="tpdm-goods-list tpdm-goods-list2" v-if="item.show_type == 1">
          <view v-for="(items, idx) in item.team_list" :key="idx" class="tpdm-goods-wrap clearfix">
            <view class="tpdm-goods-lis">
              <navigator class="tpdm-goods-pic" :url="'../../goods/goodsInfo/goodsInfo?goods_id=' + items.goods_id" href="javascript:;">
                <image :src="url + items.share_img"></image>
              </navigator>
              <navigator href="javascript:;" class="tpdm-goods-name">{{items.act_name}}</navigator>
              <view class="tpdm-goods-des">
                <view class="tpdm-goods-price">￥{{items.team_price}}</view>
                <text class="tpdm-goods-dev">单买：￥{{items.goods.shop_price}}</text>
              </view>
              <view class="tpdm-goods-mes">
                <navigator :url="'../../team/team_info/team_info?goods_id=' + items.goods_id + '&item_id=' + items.item_id + '&team_id=' + items.team_id" class="text-mes-a" href="javascript:;">去拼单 ></navigator>
                <view class="text-mes-span">{{items.needer}}人团</view>
                <view class="tpdm-acbuyer">
                  <image src></image>...</view>
              </view>
            </view>
          </view>
        </view>

        <view class="tpdm-goods-list tpdm-goods-list1" v-if="item.show_type == 0">
          <view class="tpdm-goods-wrap clearfix" id="nxkhh">
            <block v-for="(items, idx) in item.team_list" :key="idx">
              <view class="tpdm-goods-lis">
                <navigator class="tpdm-goods-pic" href="javascript:;" :url="'../../team/team_info/team_info?goods_id=' + items.goods_id + '&item_id=' + items.item_id + '&team_id=' + items.team_id">
                  <image :src="url + items.share_img"></image>
                </navigator>
                <navigator href="javascript:;" :url="'../../team/team_info/team_info?goods_id=' + items.goods_id + '&item_id=' + items.item_id + '&team_id=' + items.team_id" class="tpdm-goods-name">{{items.act_name}}</navigator>
                <view class="tpdm-goods-des">
                  <view class="tpdm-goods-price">￥{{items.team_price}}</view>
                  <view class="tpdm-sold-num">单买:￥{{items.goods.shop_price}}</view>
                </view>
                <view class="tpdm-goods-mes">
                  <navigator :url="'../../team/team_info/team_info?goods_id=' + items.goods_id + '&item_id=' + items.item_id + '&team_id=' + items.team_id" class="text-mes-a" href="javascript:;">去拼单 ></navigator>
                  <view class="text-mes-span">{{items.needer}}人团</view>
                  <view class="tpdm-acbuyer">
                    <image src></image>...</view>
                </view>
              </view>
            </block>
          </view>
        </view>

        <!-- 列表式 -->
        <view class="tpdm-goods-list tpdm-goods-list2" v-if="item.show_type == 1">
          <view v-for="(items, idx) in item.team_list" :key="idx" class="tpdm-goods-wrap clearfix">
            <view class="tpdm-goods-lis">
              <navigator class="tpdm-goods-pic" :url="'../../goods/goodsInfo/goodsInfo?goods_id=' + items.goods_id" href="javascript:;">
                <image :src="url + items.share_img"></image>
              </navigator>
              <navigator href="javascript:;" :url="'../../team/team_info/team_info?goods_id=' + items.goods_id + '&item_id=' + items.item_id + '&team_id=' + items.team_id" class="tpdm-goods-name">{{items.act_name}}</navigator>
              <view class="tpdm-goods-des">
                <view class="tpdm-goods-price">￥{{items.team_price}}</view>
                <text class="tpdm-goods-dev">单买：￥{{items.goods.shop_price}}</text>
              </view>
              <view class="tpdm-goods-mes">
                <navigator :url="'../../team/team_info/team_info?goods_id=' + items.goods_id + '&item_id=' + items.item_id + '&team_id=' + items.team_id" class="text-mes-a" href="javascript:;">去拼单 ></navigator>
                <view class="text-mes-span">{{items.needer}}人团</view>
                <view class="tpdm-acbuyer">
                  <image src></image>...</view>
              </view>
            </view>
          </view>
        </view>
      </view>

      <!-- 秒杀 -->
      <view v-if="item.activity_type == 1 && custom_skill_status">
        <block v-if="item.flash_sale_list.length >0">
          <view class="tpdm-seckill-title">
            <image class="tpdm-seckill-label" src="/static/images/s2.png"></image>
            <view id="flash_time " class="seckill-times">{{item.start_time_format}}点专场</view>
            <view class="tpdm-seckill-time" id="hms">
              <view id="time_h " class="seckill_li">{{countDownList.hou}}</view>
              <view id="time_m " class="seckill_li">{{countDownList.min}}</view>
              <view id="time_s " class="seckill_li">{{countDownList.sec}}</view>
            </view>
            <navigator class="tpdm-seckill-gd" url="../../activity/seckill_list/seckill_list">更多秒杀 ></navigator>
          </view>
          <view class="tpdm-seckill-list" id="flash_list">
            <block v-for="(items, idx) in item.flash_sale_list" :key="idx">
              <navigator class="seckill-list-a" :url="'../../goods/goodsInfo/goodsInfo?goods_id=' + items.goods_id + '&item_id=' + (items.item_id >0 ? items.item_id: '')" href="javascript:;">
                <image :src="url + '/api/goods/goodsThumImages?goods_id=' + items.goods_id + '&width=300&height=300'"></image>
                <view class="vp">{{items.goods_name}}</view>
                <view class="seckill-list-span">￥{{items.price}}</view>
                <view class="seckill-list-i">￥{{items.shop_price}}</view>
              </navigator>
            </block>
          </view>
        </block>
      </view>
    </view>
    <!-- 橱窗 -->
    <view class="tpwindow " v-if="item.block_type == 4" :style="'margin-bottom: ' + (item.spacing*2) + 'rpx'">
      <!-- 橱窗1 -->
      <view class="tpwindow1" v-if="item.window_style == 0">
        <view @tap.stop="topage" :data-type="item['nav'][0]['url_type']" :data-id="item['nav'][0]['app_url']" :data-url="item['nav'][0]['url']">
          <image :src="url + item['nav'][0]['pic']"></image>
        </view>
      </view>
      <!-- 橱窗2 -->
      <view class="tpwindow2" v-if="item.window_style == 1">
        <view @tap.stop="topage" :data-type="item['nav'][0]['url_type']" :data-id="item['nav'][0]['app_url']" :data-url="item['nav'][0]['url']">
          <image :src="url + item['nav'][0]['pic']"></image>
        </view>
        <view @tap.stop="topage" :data-type="item['nav'][1]['url_type']" :data-id="item['nav'][1]['app_url']" :data-url="item['nav'][1]['url']">
          <image :src="url + item['nav'][1]['pic']"></image>
        </view>
      </view>
      <!-- 橱窗3 -->
      <view class="tpwindow3" v-if="item.window_style == 2">
        <view class @tap.stop="topage" :data-type="item['nav'][0]['url_type']" :data-id="item['nav'][0]['app_url']" :data-url="item['nav'][0]['url']">
          <image :src="url + item['nav'][0]['pic']"></image>
        </view>
        <view class @tap.stop="topage" :data-type="item['nav'][1]['url_type']" :data-id="item['nav'][1]['app_url']" :data-url="item['nav'][1]['url']">
          <image :src="url + item['nav'][1]['pic']"></image>
        </view>
        <view class @tap.stop="topage" :data-type="item['nav'][2]['url_type']" :data-id="item['nav'][2]['app_url']" :data-url="item['nav'][2]['url']">
          <image :src="url + item['nav'][2]['pic']"></image>
        </view>
      </view>
      <!-- 橱窗4 -->
      <view class="tpwindow4" v-if="item.window_style == 3">
        <view class="wrap1" @tap.stop="topage" :data-type="item['nav'][0]['url_type']" :data-id="item['nav'][0]['app_url']" :data-url="item['nav'][0]['url']">
          <image :src="url + item['nav'][0]['pic']"></image>
        </view>
        <view class="wrap2" @tap.stop="topage" :data-type="item['nav'][1]['url_type']" :data-id="item['nav'][1]['app_url']" :data-url="item['nav'][1]['url']">
          <image :src="url + item['nav'][1]['pic']"></image>
        </view>
        <view class="wrap2 leftviewne" @tap.stop="topage" :data-type="item['nav'][2]['url_type']" :data-id="item['nav'][2]['app_url']" :data-url="item['nav'][2]['url']">
          <image :src="url + item['nav'][2]['pic']"></image>
        </view>
      </view>
      <!-- 橱窗5 -->
      <view class="tpwindow5" v-if="item.window_style == 4">
        <view class="wrap1" @tap.stop="topage" :data-type="item['nav'][0]['url_type']" :data-id="item['nav'][0]['app_url']" :data-url="item['nav'][0]['url']">
          <image :src="url + item['nav'][0]['pic']"></image>
        </view>
        <view class="wrap2" @tap.stop="topage" :data-type="item['nav'][1]['url_type']" :data-id="item['nav'][1]['app_url']" :data-url="item['nav'][1]['url']">
          <image :src="url + item['nav'][1]['pic']"></image>
        </view>
        <view class="wrap2 leftviewne" @tap.stop="topage" :data-type="item['nav'][2]['url_type']" :data-id="item['nav'][2]['app_url']" :data-url="item['nav'][2]['url']">
          <image :src="url + item['nav'][2]['pic']"></image>
        </view>
      </view>
      <!-- 橱窗6 -->
      <view class="tpwindow6" v-if="item.window_style == 5">
        <view class @tap.stop="topage" :data-type="item['nav'][0]['url_type']" :data-id="item['nav'][0]['app_url']" :data-url="item['nav'][0]['url']">
          <image :src="url + item['nav'][0]['pic']"></image>
        </view>
        <view class @tap.stop="topage" :data-type="item['nav'][1]['url_type']" :data-id="item['nav'][1]['app_url']" :data-url="item['nav'][1]['url']">
          <image :src="url + item['nav'][1]['pic']"></image>
        </view>
        <view class @tap.stop="topage" :data-type="item['nav'][2]['url_type']" :data-id="item['nav'][2]['app_url']" :data-url="item['nav'][2]['url']">
          <image :src="url + item['nav'][2]['pic']"></image>
        </view>
        <view class @tap.stop="topage" :data-type="item['nav'][3]['url_type']" :data-id="item['nav'][3]['app_url']" :data-url="item['nav'][3]['url']">
          <image :src="url + item['nav'][3]['pic']"></image>
        </view>
      </view>
      <!-- 橱窗7 -->
      <view class="tpwindow7" v-if="item.window_style == 6">
        <view class="wrap1" @tap.stop="topage" :data-type="item['nav'][0]['url_type']" :data-id="item['nav'][0]['app_url']" :data-url="item['nav'][0]['url']">
          <image :src="url + item['nav'][0]['pic']"></image>
        </view>
        <view class="wrap2" @tap.stop="topage" :data-type="item['nav'][1]['url_type']" :data-id="item['nav'][1]['app_url']" :data-url="item['nav'][1]['url']">
          <image :src="url + item['nav'][1]['pic']"></image>
        </view>
        <view class="wrap3" @tap.stop="topage" :data-type="item['nav'][2]['url_type']" :data-id="item['nav'][2]['app_url']" :data-url="item['nav'][2]['url']">
          <image :src="url + item['nav'][2]['pic']"></image>
        </view>
        <view class="wrap3 leftviewne" @tap.stop="topage" :data-type="item['nav'][3]['url_type']" :data-id="item['nav'][3]['app_url']" :data-url="item['nav'][3]['url']">
          <image :src="url + item['nav'][3]['pic']"></image>
        </view>
      </view>
      <!-- 橱窗8 -->
      <view class="tpwindow8" v-if="item.window_style == 7">
        <view class="wrap1" @tap.stop="topage" :data-type="item['nav'][0]['url_type']" :data-id="item['nav'][0]['app_url']" :data-url="item['nav'][0]['url']">
          <image :src="url + item['nav'][0]['pic']"></image>
        </view>
        <view class="wrap2" @tap.stop="topage" :data-type="item['nav'][2]['url_type']" :data-id="item['nav'][2]['app_url']" :data-url="item['nav'][2]['url']">
          <image :src="url + item['nav'][2]['pic']"></image>
        </view>
        <view class="wrap2 topviewne" @tap.stop="topage" :data-type="item['nav'][3]['url_type']" :data-id="item['nav'][3]['app_url']" :data-url="item['nav'][3]['url']">
          <image :src="url + item['nav'][3]['pic']"></image>
        </view>
        <view class="wrap3 leftviewne" @tap.stop="topage" :data-type="item['nav'][1]['url_type']" :data-id="item['nav'][1]['app_url']" :data-url="item['nav'][1]['url']">
          <image :src="url + item['nav'][1]['pic']"></image>
        </view>
      </view>
      <!-- 橱窗9 -->
      <view class="tpwindow9" v-if="item.window_style == 8">
        <view class="wrap1" @tap.stop="topage" :data-type="item['nav'][0]['url_type']" :data-id="item['nav'][0]['app_url']" :data-url="item['nav'][0]['url']">
          <image :src="url + item['nav'][0]['pic']"></image>
        </view>
        <view class="wrap2" @tap.stop="topage" :data-type="item['nav'][1]['url_type']" :data-id="item['nav'][1]['app_url']" :data-url="item['nav'][1]['url']">
          <image :src="url + item['nav'][1]['pic']"></image>
        </view>
        <view class="botviewne" @tap.stop="topage" :data-type="item['nav'][2]['url_type']" :data-id="item['nav'][2]['app_url']" :data-url="item['nav'][2]['url']">
          <image :src="url + item['nav'][2]['pic']"></image>
        </view>
        <view class="botviewne" @tap.stop="topage" :data-type="item['nav'][3]['url_type']" :data-id="item['nav'][3]['app_url']" :data-url="item['nav'][3]['url']">
          <image :src="url + item['nav'][3]['pic']"></image>
        </view>
      </view>
    </view>
    <!-- 文本导航 -->
    <view class="tpdm-txtnav-list " v-if="item.block_type == 5" :style="'margin-bottom: ' + (item.spacing*2) + 'rpxcolor:' + item.text_font_color + 'background-color:' + item.text_bg_color + ''">
      <view class="txtnav-list-cont" :style="'text-align:' + item.text_align + 'font-size:' + item.text_font + 'pxcolor:' + item.text_font_color">{{item.txt_title}}</view>
      <view class="txtnav-lis-a" @tap.stop="topage" :data-type="item['url_type']" :data-id="item['app_url']" :data-url="item['url']">更多</view>
    </view>
    <!-- 优惠券 -->
    <view class="coupons " v-if="item.block_type == 7" :style="'margin-bottom: ' + (item.spacing*2) + 'rpx'">
      <!-- 优惠券1 -->
      <view class="coupons1" v-if="item.coupon_style == 0">
        <scroll-view scroll-x="true" class="containers-slider-cont" style=" white-space: nowrap; ">
          <block v-for="(items, idx) in item.nav" :key="idx">

            <view class="coupons_items">
              <text class="cou_mon"><text class="cou_icon"></text>￥{{items['money']}}</text>
              <text class="cou_cond">满{{items['condition']}}使用</text>
              <view @tap.stop="getCoupon" :data-cid="items.id" class="cou_viewnk">
                <image src="/static/images/bg-coupon1.png"></image>
                <text>立即领取</text>
              </view>
            </view>
          </block>
        </scroll-view>
      </view>
      <!-- 优惠券2 -->
      <view class="coupons2" v-if="item.coupon_style == 1">
        <scroll-view scroll-x="true" class="containers-slider-cont" style=" white-space: nowrap; ">
          <block v-for="(items, idx) in item.nav" :key="idx">
            <view class="coupons_items">
              <view class="coupon_bj">
                <image src="/static/images/bg-coupon2.png"></image>
              </view>
              <view class="coupon_le">
                <text>￥</text>{{items.money}}</view>
              <view class="coupon_ri">
                <text>满{{items.condition}}使用</text>
                <view @tap.stop="getCoupon" :data-cid="items.id" class="cou_viewnk">立即领取</view>
              </view>
            </view>
          </block>
        </scroll-view>
      </view>
      <!-- 优惠券3 -->
      <view class="coupons2" v-if="item.coupon_style == 2">
        <scroll-view scroll-x="true" class="containers-slider-cont" style=" white-space: nowrap; ">
          <block v-for="(items, idx) in item.nav" :key="idx">
            <view class="coupons_items">
              <view class="coupon_bj">
                <image src="/static/images/bg-coupon2.png"></image>
              </view>
              <view class="coupon_le">
                <text>￥</text>{{items.money}}</view>
              <view class="coupon_ri">
                <text>满{{items.condition}}使用</text>
                <view @tap.stop="getCoupon" :data-cid="items.id" class="cou_viewnk">立即领取</view>
              </view>
            </view>
          </block>
        </scroll-view>
      </view>
    </view>
    <!-- 滚动公告 -->
    <!-- 滚动公告 -->
    <view class="tpdm-messtyle " v-if="item.block_type == 10" :style="'margin-bottom: ' + (item.spacing*2) + 'rpxbackground:' + item.msg_bg_color">
      <view class="tpdm-mes-logo">
        <image :src="url + item.notice_pic || '../../img/z-mse1.png'" alt></image>
      </view>
      <view class="tpdm-mes-title" id="tpdm-mes-title">
        <swiper class="swiper_container" vertical="true" autoplay="true" circular="true" interval="3000">
          <swiper-item v-for="(items, index2) in item.nav" :key="index2">
            <view class="tpdm-mesname" @tap.stop="topage" :data-type="items['url_type']" :data-id="items['app_url']" :data-url="items['url']">
              <view>
                <text class="tpdm-mesname-name" :style="'color:' + item.msg_font_color + 'font-size:' + (item.text_font*2) + 'rpx'">{{items.notice_info}}</text>
              </view>
            </view>
          </swiper-item>
        </swiper>
      </view>
    </view>
    <!-- <view class="tpdm-messtyle " wx:if="{{item.block_type == 10}}" style="margin-bottom: {{item.spacing*2}}rpx;background:{{item.msg_bg_color}}">
        <view class="tpdm-mes-logo">
          <image src="{{url + item.notice_pic || '../../img/z-mse1.png' }}" alt=""></image>
        </view>
        <view class="tpdm-mes-title" id="tpdm-mes-title">
          <swiper class="swiper_container" vertical="true" autoplay="true" circular="true" interval="3000">
            <swiper-item wx:for="{{item.nav}}" wx:for-item="items">
              <view class="tpdm-mesname" catchtap='topage' data-type="{{items['url_type']}}" data-id="{{items['app_url']}}" data-url="{{items['url']}}">
                <view>
                  <text class="tpdm-mesname-name" style="color:{{item.msg_font_color}};font-size:{{item.text_font*2}}rpx;">{{items.notice_info}}</text>
                </view>
              </view>
            </swiper-item>
          </swiper>
        </view>
      </view> -->

    <!-- 视频 s -->
    <view class="tpd-video" v-if="item.block_type == 14" :style="'margin-bottom: ' + (item.spacing*2) + 'rpx'">
      <video id="myVideo" :poster="url + item.video_img" :src="video.video_url" @error="videoErrorCallback" controls>
      </video>
    </view>
    <!-- 视频 e -->

    <!-- 多门店店铺 -->
    <view class="tpd-multipleStores-wrap " v-if="item.block_type == 18" :style="'margin-bottom: ' + (item.spacing*2) + 'rpx'" :hidden="ad">
      <view class="tpd-multipleStores-head">——
        <text>{{item.top_title}}</text>——</view>
      <view class="tpd-multipleStores-dizi" v-if="address">
        <view class="tpd-multipleStores-icon1">
          <image src="/static/images/z-dingw1.png"></image>
        </view>
        <text>当前：</text>
        <text>{{address}}</text>
      </view>
      <view v-for="(item, index2) in shop_list" :key="index2" class="tpd-multipleStores-li">
        <view @tap.stop="shop_page" :data-id="item.shop_id" :data-item="item">
          <view class="tpd-multipleStores-list">
            <view class="tpd-multipleStores-img">
              <image :src="url + item.shop_img"></image>
            </view>
            <view class="tpd-multipleStores-cont">
              <text>{{item.shop_name}}</text>
              <text>{{item.shop_desc}}</text>
            </view>
          </view>
          <view class="tpd-multipleStores-wzhi">
            <image class="tpd-multipleStores-icon2" src="/static/images/z-dingw2.png"></image>
            <view class="vieaddres">{{item.shop_address}}</view>
            <text>{{item.distance}}Km</text>
          </view>
        </view>
      </view>
    </view>

    <!-- 单文本 -->
    <view class="tpd-text-cont " v-if="item.block_type == 17" :style="'margin-bottom: ' + (item.spacing*2) + 'rpxbackground:' + item.text_bg_color + 'font-size:' + item.text_font + 'px'" @tap.stop="topage" :data-type="item['url_type']" :data-id="item['app_url']" :data-url="item['url']">
      <view :style="'color:' + item.text_font_color + 'text-align:' + item.text_align + ''">{{item.txt_title}}</view>
    </view>

    <!-- 图文列表s -->
    <!-- 左图右文 -->
    <view class="float" v-if="item.block_type == 15" :style="'margin-bottom: ' + (item.spacing*2) + 'rpx'">
      <view class=" tpd-graphicLists tpd-graphic-wrap1" v-if="item.article_type == 0" @tap.stop="topage" :data-type="item['url_type']" :data-id="item['app_url']" :data-url="item['url']">
        <view class="tpd-graphicLists-ul">
          <view class="tpd-graphicLists-li">
            <view>
              <view class="tpd-graphicList-img fl">
                <image :src="url + item.nav[0]['pic']"></image>
              </view>
              <view class="tpd-graphicList-cont fr">
                <view class="graphicList-cont-h3">
                  {{item.title}}
                </view>
                <view class="graphicList-cont-p">
                  {{item.content}}
                </view>
              </view>
            </view>
          </view>
        </view>
      </view>
      <!-- 左文右图 -->
      <view class=" tpd-graphicLists tpd-graphic-wrap2" v-if="item.article_type == 1" @tap.stop="topage" :data-type="item['url_type']" :data-id="item['app_url']" :data-url="item['url']">
        <view class="tpd-graphicLists-ul">
          <view class="tpd-graphicLists-li">
            <navigator>
              <view class="tpd-graphicList-img fl">
                <image :src="url + item.nav[0]['pic']"></image>
              </view>
              <view class="tpd-graphicList-cont fr">
                <view class="graphicList-cont-h3">
                  {{item.title}}
                </view>
                <view class="graphicList-cont-p">
                  {{item.content}}
                </view>
              </view>
            </navigator>
          </view>
        </view>
      </view>
      <!-- 上下单图 -->
      <view class=" tpd-graphicLists tpd-graphic-wrap3" v-if="item.article_type == 2" @tap.stop="topage" :data-type="item['url_type']" :data-id="item['app_url']" :data-url="item['url']">
        <view class="tpd-graphicLists-ul">
          <view class="tpd-graphicLists-li">
            <navigator>
              <view class="tpd-graphicList-cont fr">
                <view class="graphicList-cont-h3">
                  {{item.title}}
                </view>
                <view class="graphicList-cont-p">
                  {{item.content}}
                </view>
              </view>
              <view class="tpd-graphicList-img fl">
                <image :src="url + item.nav[0]['pic']"></image>
              </view>
            </navigator>
          </view>
        </view>
      </view>
      <!-- 上下双图 -->
      <view class=" tpd-graphicLists tpd-graphic-wrap4" v-if="item.article_type == 3" @tap.stop="topage" :data-type="item['url_type']" :data-id="item['app_url']" :data-url="item['url']">
        <view class="tpd-graphicLists-ul">
          <view class="tpd-graphicLists-li">
            <navigator>
              <view class="tpd-graphicList-cont fr">
                <view class="graphicList-cont-h3">
                  {{item.title}}
                </view>
                <view class="graphicList-cont-p">
                  {{item.content}}
                </view>
              </view>
              <view class="tpd-graphicList-img fl">
                <image :src="url + item.nav[0]['pic']"></image>
                <image :src="url + item.nav[1]['pic']"></image>
              </view>
            </navigator>
          </view>
        </view>
      </view>
      <!-- 上下三图 -->
      <view class=" tpd-graphicLists tpd-graphic-wrap5" v-if="item.article_type == 4" @tap.stop="topage" :data-type="item['url_type']" :data-id="item['app_url']" :data-url="item['url']">
        <view class="tpd-graphicLists-ul">
          <view class="tpd-graphicLists-li">
            <navigator>
              <view class="tpd-graphicList-cont fr">
                <view class="graphicList-cont-h3">
                  {{item.title}}
                </view>
                <view class="graphicList-cont-p">
                  {{item.content}}
                </view>
              </view>
              <view class="tpd-graphicList-img fl">
                <image :src="url + item.nav[0]['pic']"></image>
                <image :src="url + item.nav[1]['pic']"></image>
                <image :src="url + item.nav[2]['pic']"></image>
              </view>
            </navigator>
          </view>
        </view>
      </view>
    </view>
    <!-- 图文列表e -->

    <!-- 富文本 -->
    <view class="tpd-richText-cont" v-if="item.block_type == 16" :style="'margin-bottom: ' + (item.spacing*2) + 'rpxbackground:' + item.bgcolor">
      <!--<import src="../../../utils/wxParse/wxParse.wxml"></import>-->
      <jyf-parser :html="article_content"></jyf-parser>
    </view>

    <!-- 滑动轮播 s -->
    <!-- style="{{item.tab_title.length >3 ? 'min-width:15%;' : item.tab_title.length==1? 'width:100%;':item.tab_title.length==2? 'width:50%;':item.gootab_titleds_list.length==3? 'width:33%;':''}}" -->
    <view class="tpd-containers-slider " v-if="item.block_type == 13" :style="'margin-bottom: ' + (item.spacing*2) + 'rpx'">
      <!-- <view class="containers-slider-title" wx:if="{{item.name_show == 1}}">{{item.tab_title}}</view> -->
      <view v-if="homeData.hot_goods" class="section">
        <view class="section-title">{{item.tab_title}}</view>
        <!-- <view class="section-subtitle"><image class="wh100" src="../../../images/pic-interesting.png" ></image></view> -->
      </view>
      <view class="containers-slider-wrap">
        <view class="containers-slider-cont" style=" white-space: nowrap; ">
          <!-- <scroll-view scroll-x="true" class="containers-slider-cont" style=" white-space: nowrap; " > -->
          <view v-for="(items, index2) in item.goods_list" :key="index2" class="containers-slider-item" v-if="index<item.num">
            <navigator :url="'../../goods/goodsInfo/goodsInfo?goods_id=' + items.goods_id">
              <view class="seckill-item-img">
                <image mode="aspectFit" :src="items.original_img"></image>
              </view>
              <view class="seckill-item-name">
                <view class="seckill-item-p">
                  {{items.goods_name}}
                </view>
              </view>
              <view class="seckill-item-price">
                <view class="item-price-span">
                  ￥
                  <text style="font-size:20rpx;"> {{items.activity.prom_price>0?items.activity.prom_price:items.shop_price}}</text>
                </view>
              </view>
              <text style="left:8rpx;" :hidden="!items.activity.prom_title" class="Seconds_kill">{{items.activity.prom_title}}</text>
            </navigator>
          </view>
        </view>
        <!-- </scroll-view> -->
      </view>
    </view>
    <!-- 滑动轮播 e -->

    <!-- 新闻列表 -->
    <view class="index_news_list" v-if="item.block_type == 12" :style="'margin-bottom: ' + (item.spacing*2) + 'rpx'">
      <view class="tpdm-goods-nav">
        <text class="goods-nav-list">{{item.new_title}}</text>
        <navigator class="news-more" data-link="/api/news/news_list.html" data-id @tap.stop="goNewsDetail">更多>></navigator>
      </view>
      <view v-for="(items, idx) in item.new_list" :key="idx" class="newlist-con">
        <view class="hottea-list" @tap.stop="goNewsDetail" data-link :data-id="items.article_id">
          <view class="carlist-img">
            <image :src="url+items.thumb"></image>
          </view>
          <view class="carlist-txt">
            <text class="news_title">{{items.title}}</text>
            <text class="news_intro">{{items.description}}</text>
            <view class="news_info">
              <text class="news_type">{{items.cat_name}}</text>
              <image src="/static/images/icon-fire.png"></image>
              <text class="news_time">{{items.add_time}}</text>
            </view>
          </view>
        </view>
      </view>
    </view>

    <view class="z-form-wrap" v-if="item.block_type == 19" :style="'margin-bottom: ' + (item.spacing*2) + 'rpxbackground-color:' + item.bg_color">
      <form>
        <view class="z-form-item">

          <block v-for="(items, idx) in item.nav" :key="idx">
            <!-- 单文本 -->
            <view class="z-form-text" v-if="items.type == 0">
              <text class="form-name">{{items.title}}</text>
              <view class="form-text-input">
                <input type="text" :data-fid="index" :data-idx="idx" :style="'border-color:' + items.border_color + ''" @blur="checkFromType" :value="items.val" :placeholder="items.placeholder || '请输入内容'"></input>
              </view>
            </view>
            <!-- 多文本 -->
            <view class="z-form-textarea" v-if="items.type == 1">
              <text class="form-name">{{items.title}}</text>
              <view class="form-textarea-input">
                <textarea :data-fid="index" :data-idx="idx" :placeholder="items.placeholder || '请输入内容'" @blur="checkFromType" :style="'border-color:' + items.border_color + 'height:' + (items.min_height * 20) + 'px'" :value="items.val"></textarea>
              </view>
            </view>
            <!-- 时间 -->
            <view class="z-form-time" v-if="items.type == 2">
              <text class="form-name">时间</text>
              <view class="form-time-input">
                <picker mode="date" :value="!items.val?'':intelligence_date" start="2018-01-01" end="2025-12-30" @change="bindTimeChange" :data-fid="index" :data-idx="idx">
                  <view class="picker picker-date-text">
                    当前选择:
                    <text>{{!items.val?'':intelligence_date}}</text>
                  </view>
                </picker>
              </view>
            </view>
            <!-- 地区 -->
            <view class="z-form-time" v-if="items.type == 3">
              <text class="form-name">地区</text>
              <view class="picker-date-dq" :data-fid="index" :data-idx="idx" @tap="openRegionsModal">请选择地区:
                <block v-if="items.val">
                  <text>{{from_address.province_name}} {{from_address.city_name}} {{from_address.district_name}} {{from_address.twon_name != 'null'?from_address.twon_name:''}}</text>
                </block>
                <block v-else>
                  <text></text>
                </block>
              </view>
            </view>
            <!-- 单选按钮 -->
            <view class="form-radio" v-if="items.type == 4">
              <text class="form-name">{{items.title}}</text>
              <block v-if="items.option_type == 1">
                <radio-group :class="'group  flex ' + (items.option_name.length < 3 ? 'space-around':'space-between')">
                  <view v-for="(itemss, idxs) in items.option_name" :key="idxs" class="label-2">
                    <radio :id="idxs" hidden :value="idxs" :checked="idxs == itemss.selected ?'true':''"></radio>
                    <view class="label-2__icon" @tap.stop="radioChange" :data-fid="index" :data-idx="idx" :data-idxs="idxs" :style="'border-color:' + items.border_color + ''">
                      <view class="label-2__icon-checked" @tap.stop="radioChange" :data-fid="index" :data-idx="idx" :data-idxs="idxs" :style="'opacity:' + (idxs ==itemss.selected? 1: 0)"></view>
                    </view>
                    <label class="label-2__text">
                      <text>{{itemss.name}}</text>
                    </label>
                  </view>
                </radio-group>
              </block>
              <block v-else>
                <radio-group class="group ">
                  <view v-for="(itemss, idxs) in items.option_name" :key="idxs" class="label-2">
                    <radio :id="idxs" hidden :value="idxs" :checked="idxs == itemss.selected ?'true':''"></radio>
                    <view class="label-2__icon" @tap.stop="radioChange" :data-fid="index" :data-idx="idx" :data-idxs="idxs" :style="'border-color:' + items.border_color + ''">
                      <view class="label-2__icon-checked" @tap.stop="radioChange" :data-fid="index" :data-idx="idx" :data-idxs="idxs" :style="'opacity:' + (idxs ==itemss.selected? 1: 0)"></view>
                    </view>
                    <label class="label-2__text">
                      <text>{{itemss}}</text>
                    </label>
                  </view>
                </radio-group>
              </block>
            </view>
            <!-- 多选按钮 -->
            <view class="form-checkbox" v-if="items.type == 5">
              <text class="form-name">{{items.title}}</text>
              <block v-if="items.option_type == 1">
                <checkbox-group :class="'group  flex ' + (items.option_name.length < 3 ? 'space-around':'space-between')">
                  <view v-for="(itemss, idxs) in items.option_name" :key="idxs" class="label-1">
                    <label>
                      <checkbox hidden :value="idxs" :checked="idxs ==  itemss.selected ?'true':''"></checkbox>
                      <view class="label-1__icon" @tap.stop="checkboxChange" :data-fid="index" :data-idx="idx" :data-idxs="idxs" :style="'border-color:' + items.border_color + ''">
                        <view class="label-1__icon-checked" @tap.stop="checkboxChange" :data-fid="index" :data-idx="idx" :data-idxs="idxs" :style="'opacity:' + (idxs ==  itemss.selected ? 1: 0)"></view>
                      </view>
                      <text class="label-1__text">{{itemss.name}}</text>
                    </label>
                  </view>
                </checkbox-group>
              </block>
              <block v-else>
                <checkbox-group class="group">
                  <view v-for="(itemss, idxs) in items.option_name" :key="idxs" class="label-1">
                    <label>
                      <checkbox hidden :value="idxs" :checked="idxs ==  itemss.selected ?'true':''"></checkbox>
                      <view class="label-1__icon" @tap.stop="checkboxChange" :data-fid="index" :data-idx="idx" :data-idxs="idxs" :style="'border-color:' + items.border_color + ''">
                        <view class="label-1__icon-checked" @tap.stop="checkboxChange" :data-fid="index" :data-idx="idx" :data-idxs="idxs" :style="'opacity:' + (idxs ==  itemss.selected ? 1: 0)"></view>
                      </view>
                      <text class="label-1__text">{{itemss.name}}</text>
                    </label>
                  </view>
                </checkbox-group>
              </block>
            </view>
          </block>
          <!-- 提交按钮 -->
          <view class="z-from-btn">
            <button :style="'color:' + item.submit_color + 'background-color:' + item.submit_bg_color + ''" @tap.stop="fromSubmit" :data-fid="index">{{item.submit_name}}</button>
          </view>
        </view>
      </form>
    </view>





    <!-- 自定义客服 -->
    <view :style="'margin-bottom:' + item.spacing + 'rpx'" class="custom_service" v-if="item.block_type == 21">

      <button class="cs-button" open-type="contact" :session-from="'wechat|' + userInfo.user_id + '|' + userInfo.nickname + '|' + userInfo.head_pic" v-if="item.pic">
        <image :src="url + item.pic"></image>
      </button>

      <button class="cs-button" open-type="contact" :session-from="'wechat|' + userInfo.user_id + '|' + userInfo.nickname + '|' + userInfo.head_pic" v-if="!item.pic">
        <image class="custom_kf" src="/static/images/custom_kf.png"></image>
      </button>
    </view>
  </block>
</block>
   </block>

<!-- 底部菜单 -->
<!--<import src="../../index/publics/publics.wxml"></import>-->
<block v-if="menu_model.length > 0">
         <block data-type="template" data-is="model" data-attr="page:menu_index,menu_model:menu_model,url:url,defaultMenu:defaultMenu">
<!-- 底部菜单 -->
<view class="pos_fixed">
    <view class="tpd-footer tpd-footer2" v-if="[].length > 0">
       <block v-for="(item, index) in []" :key="index">
        <view hover-class="none" @tap.stop="topage" data-obj="custom" :data-idx="index" :class="menu_index == index ? 'tpd-footer-select' : ''"><image :src="menu_index == index ? url + item.pic2 : url + item.pic1"></image><text :style="'color:' + (menu_index == index ? item.navFontColor : '')">{{item.title_name}}</text></view>  
        </block> 
    </view>

    <view class="tpd-footer tpd-footer1" v-if="defaultMenu">
        <view hover-class="none" @tap.stop="topages" data-idx="0" :class="menu_index == 0 ? 'tpd-footer-select' : ''"><image :src="menu_index == 0 ? '/images/home2.png' : '/images/home1.png'"></image><text>首页</text></view>
        <view hover-class="none" @tap.stop="topages" data-idx="1" :class="menu_index == 1 ? 'tpd-footer-select' : ''"><image :src="menu_index == 1 ? '/images/category2.png' : '/images/category1.png'"></image><text>分类</text></view>
        <view hover-class="none" @tap.stop="topages" data-idx="4" :class="menu_index == 4 ? 'tpd-footer-select' : ''"><image :src="menu_index == 4 ? '/images/play2.png' : '/images/play1.png'"></image><text>直播</text></view>
        <view hover-class="none" @tap.stop="topages" data-idx="2" :class="menu_index == 2 ? 'tpd-footer-select' : ''"><image :src="menu_index == 2 ? '/images/cart2.png' : '/images/cart1.png'"></image><text>购物车</text></view>
        <view hover-class="none" @tap.stop="topages" data-idx="3" :class="menu_index == 3 ? 'tpd-footer-select' : ''"><image :src="menu_index == 3 ? '/images/user2.png' : '/images/user1.png'"></image><text>我的</text></view>
    </view>
  </view>
</block>
</block>
<block v-else>
        <block data-type="template" data-is="model" data-attr="page:0,menu_model:[],url:url,defaultMenu:defaultMenu">
<!-- 底部菜单 -->
<view class="pos_fixed">
    <view class="tpd-footer tpd-footer2" v-if="[].length > 0">
       <block v-for="(item, index) in []" :key="index">
        <view hover-class="none" @tap.stop="topage" data-obj="custom" :data-idx="index" :class="menu_index == index ? 'tpd-footer-select' : ''"><image :src="menu_index == index ? url + item.pic2 : url + item.pic1"></image><text :style="'color:' + (menu_index == index ? item.navFontColor : '')">{{item.title_name}}</text></view>  
        </block> 
    </view>

    <view class="tpd-footer tpd-footer1" v-if="defaultMenu">
        <view hover-class="none" @tap.stop="topages" data-idx="0" :class="menu_index == 0 ? 'tpd-footer-select' : ''"><image :src="menu_index == 0 ? '/images/home2.png' : '/images/home1.png'"></image><text>首页</text></view>
        <view hover-class="none" @tap.stop="topages" data-idx="1" :class="menu_index == 1 ? 'tpd-footer-select' : ''"><image :src="menu_index == 1 ? '/images/category2.png' : '/images/category1.png'"></image><text>分类</text></view>
        <view hover-class="none" @tap.stop="topages" data-idx="4" :class="menu_index == 4 ? 'tpd-footer-select' : ''"><image :src="menu_index == 4 ? '/images/play2.png' : '/images/play1.png'"></image><text>直播</text></view>
        <view hover-class="none" @tap.stop="topages" data-idx="2" :class="menu_index == 2 ? 'tpd-footer-select' : ''"><image :src="menu_index == 2 ? '/images/cart2.png' : '/images/cart1.png'"></image><text>购物车</text></view>
        <view hover-class="none" @tap.stop="topages" data-idx="3" :class="menu_index == 3 ? 'tpd-footer-select' : ''"><image :src="menu_index == 3 ? '/images/user2.png' : '/images/user1.png'"></image><text>我的</text></view>
    </view>
  </view>
</block>
</block>

<!-- 选择地址弹框  -->
<!--<import src="../../../utils/regions/regions.wxml"></import>-->
<block data-type="template" data-is="regions" data-attr="regions">
    <!-- 选择地址弹框  -->
    <view :hidden="!regions.showRegionsModal">
        <view class="cover-layer" @tap="closeRegionsModal"></view>
        <view class="regions">
            <view v-for="(item, index) in regions.regions" :key="index" class="region" :data-id="item.id" :data-name="item.name" @tap="openRegionsModal">{{item.name}}</view>
        </view>
    </view>
</block>
</view>
</template>

<script>
// pages/index/customPage/customPage.js
//获取应用实例
var app = getApp();
var request = app.globalData.request;
var setting = app.globalData.setting;
var bmap = require("../../../libs/bmap-wx.min.js");
var util = require("../../../utils/util.js");
var common = require("../../../utils/common.js");

import Regions from "../../../utils/regions/Regions";

export default {
  data() {
    return {
      infologin: false,
      ak: 'fZksmKUsUDqqYs2FHWv6CHHBIF3cR5qK',
      //百度地图key
      ad: true,
      //门店列表
      url: setting.url,
      resourceUrl: setting.resourceUrl,
      logo: setting.appLogo,
      homeData: null,
      //首页轮播和广告
      saleGoods: null,
      sale: {
        countTime: {
          hour: 0,
          minute: 0,
          second: 0
        },
        diffTime: 0,
        good: null
      },
      countTime: {
        hour: 0,
        minute: 0,
        second: 0
      },
      timer: null,
      //活动倒计时定时器
      recommend: null,
      //推荐商品
      scrollTop: 0,
      currentPage: 1,
      is_block: 0,
      goods_show: 0,
      end_time: '',
      //秒杀结束时间
      countDownList: {
        day: '00',
        hou: '00',
        min: '00',
        sec: '00'
      },
      //秒杀结束初始化时间
      webUrl: '',
      address: '',
      //当前地址
      menu_index: 0,
      //菜单索引
      defaultMenu: false,
      //默认底部菜单显示状态
      custom_skill_status: false,
      wap_home_logo: "",
      video: "",
      search: "",
      menu_model: "",
      models: "",
      block_model: "",
      shop_list: "",
      coupons: "",
      goods_show_fid: "",
      iflogin: "",
      intelligence_date: "",
      article_content: ""
    };
  },

  components: {},
  props: {},

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var index = options.types ? options.types : app.globalData.menu_index;
    var wap_home_logo;
    app.globalData.getConfig(function (res) {
      wap_home_logo = common.getConfigByName(res.config, 'wap_home_logo'); //首页logo
    });
    this.setData({
      menu_index: index,
      wap_home_logo: wap_home_logo
    });
    this.checklogin();
    this.getAutoData(options.id);
    uni.setNavigationBarTitle({
      title: setting.appName
    });
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {},

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    if (this.infologin) {
      this.infologin = false;
      this.checklogin();
    }
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {},

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {},

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {},

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {},

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {},
  methods: {
    /****************************** 自定义 start ********************************/
    //获取自定义首页数据
    getAutoData: function (id) {
      var that = this;
      var url = !id ? '/api/Index/block_index' : '/api/Index/block_index/id/' + id;
      request.get(url, {
        failRollback: true,
        successReload: true,
        success: function (res) {
          if (res.data.status == 1) {
            var data = res.data.result.blocks; //模块集合

            var skill = []; //秒杀

            var block_model = []; //其他模块集合

            var shop = []; //多门店集合

            var content = []; //富文本集合

            var menu_model = []; //菜单集合

            var video = []; //视频集合

            var search = []; //搜索

            var ids = [];

            for (let z = 0; z < data.length; z++) {
              if (data[z]['block_type'] == '6') {
                skill = data[z];
              }

              if (data[z]['block_type'] == '14') {
                data[z]['video_url'] = data[z]['video_url'].indexOf('http') == -1 ? setting.url + data[z]['video_url'] : data[z]['video_url'];
                video = data[z];
              }

              if (data[z]['block_type'] != '8' && data[z]['block_type'] != '9' && data[z]['block_type'] != '11') {
                if (data[z]['block_type'] == '3') {
                  data[z]['list'] = data[z]['nav'][0]['goods_list'];
                }

                block_model.push(data[z]);
                ids.push(data[z]['div_order']);
              }

              if (data[z]['block_type'] == '8') {
                search = data[z];
              }

              if (data[z]['block_type'] == '18') {
                shop = data[z];
              }

              if (data[z]['block_type'] == '16') {
                content = data[z];
              }

              if (data[z]['block_type'] == '11') {
                menu_model = data[z];
              }

              if (data[z]['block_type'] == '19') {
                for (let i = 0; i < data[z]['nav'].length; i++) {
                  if (data[z]['nav'][i]['type'] == 4) {
                    //radio_from = data[z]['nav'][i]['option_name'];
                    var len = data[z]['nav'][i]['option_name'].length;
                    var arrs = [];

                    for (let ii = 0; ii < len; ii++) {
                      let obj = {
                        name: data[z]['nav'][i]['option_name'][ii],
                        selected: -1
                      };
                      arrs.push(obj);
                    }

                    data[z]['nav'][i]['option_name'] = arrs;
                  }

                  if (data[z]['nav'][i]['type'] == 5) {
                    //checked_from = data[z]['nav'][i]['option_name'];
                    var len = data[z]['nav'][i]['option_name'].length;
                    var arrs = [];

                    for (let ii = 0; ii < len; ii++) {
                      let obj = {
                        name: data[z]['nav'][i]['option_name'][ii],
                        selected: -1
                      };
                      arrs.push(obj);
                    }

                    data[z]['nav'][i]['option_name'] = arrs;
                  }
                }

                that.initRegions();
              }
            }

            var array = [];

            if (ids.length > 0) {
              for (let y = 1; y <= ids.length; y++) {
                array.push(y);
              }
            }

            if (content != '') {
              //WxParse.wxParse('content', 'html', content.content, that, 6)
              setTimeout(() => {
                that.article_content = content.content;
              }, 200);
            }

            if (skill != '' && skill.activity_type == 1) {
              that.setData({
                end_time: skill.end_time
              });
              that.destroyActivityTimer();
              that.timer = setInterval(function () {
                that.secondKill();
              }, 1000);
            }

            if (shop != '') {
              uni.getLocation({
                type: 'wgs84',
                altitude: true,
                success: function (res) {
                  that.getUserLatitudeLongitude(shop, res);
                },

                fail(e) {
                  app.globalData.confirmBox('如需正常使用小程序门店自提点功能，请在【我的】页面中点击授权按钮，勾选用户信息并点击确定。');
                }

              });
            }

            block_model = that.returnModelArr(block_model, array);
            app.globalData.menu_model = menu_model.nav;
            that.setData({
              video: video,
              search: search,
              menu_model: menu_model.nav,
              models: res.data.result,
              block_model: block_model
            });
          }
        }
      });
    },
    jumpSearch: function () {
      uni.navigateTo({
        url: '/pages/goods/search/search'
      });
    },

    /** 获取授权用户经纬度 */
    getUserLatitudeLongitude(result, res) {
      var that = this; //根据用户当前经纬度获取相应的附近门店

      request.post('/api/Index/shopList', {
        data: {
          lng: res.longitude,
          lat: res.latitude,
          province: '',
          search_radius: result.search_radius
        },
        failRollback: true,
        successReload: true,
        success: function (res) {
          var ad = res.data.result.length > 0 ? false : true;
          that.setData({
            shop_list: res.data.result,
            ad: ad
          });
        }
      }); //用户当前经纬度地址位置

      var BMap = new bmap.BMapWX({
        ak: that.ak
      });

      var fail = function (data) {
        console.log(data);
      };

      var success = function (data) {
        var originalData = data.originalData;
        that.setData({
          address: originalData.result.formatted_address
        });
      };

      BMap.regeocoding({
        location: res.latitude + ',' + res.longitude,
        //22.622572 + ',' + 114.077780, // 22.71991 + ',' + 114.24779, 
        fail: fail,
        success: success
      });
    },

    shop_page(e) {
      uni.navigateTo({
        url: '/pages/cart/cart2/shopDetail/shopDetail?datas=' + JSON.stringify(e.currentTarget.dataset.item)
      });
    },

    /** 自定义模板秒杀接口时间数据 */
    secondKill: function () {
      // 获取当前时间
      let newTime = new Date().getTime();
      let countDownArr = null; // 对结束时间进行处理渲染到页面    

      let endTime = this.end_time * 1000; //活动结束时间       

      let obj = null; // 如果活动未结束，对时间进行处理

      if (endTime - newTime > 0) {
        let time = (endTime - newTime) / 1000; // 获取天、时、分、秒

        let day = parseInt(time / (60 * 60 * 24));
        let hou = parseInt(time % (60 * 60 * 24) / 3600);
        let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
        let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
        obj = {
          day: this.timeFormat(day),
          hou: this.timeFormat(hou),
          min: this.timeFormat(min),
          sec: this.timeFormat(sec)
        };
      } else {
        //活动已结束，全部设置为'00'
        this.destroyActivityTimer();
        this.setData({
          custom_skill_status: false
        });
        this.getAutoData(); //首页数据

        return;
      }

      countDownArr = obj;
      this.setData({
        countDownList: countDownArr,
        custom_skill_status: true
      });
    },

    timeFormat(param) {
      //小于10的格式化函数
      return param < 10 ? '0' + param : param;
    },

    /** 领券 */
    getCoupon: function (e) {
      var that = this;
      var coupon_id = e.currentTarget.dataset.cid;
      request.post('/api/activity/get_coupon', {
        data: {
          coupon_id: coupon_id
        },
        success: function (res) {
          app.globalData.showSuccess(res.data.msg);

          for (var i in that.coupons) {
            if (that.coupons[i].id == coupon_id) {
              that.coupons.splice(i, 1);
              that.setData({
                coupons: that.coupons
              });
              break;
            }
          }
        }
      });
    },

    /** 跳转模式 自定义页面 || 自定义菜单 || 自定义控件控件*/
    topage: function (e) {
      //自定义控件控件
      var obj = e.currentTarget.dataset.obj ? e.currentTarget.dataset.obj : '';
      var url = e.currentTarget.dataset.url;
      var page_type = e.currentTarget.dataset.type;
      var id = e.currentTarget.dataset.id;

      if (obj == 'custom') {
        //底部自定义菜单
        var idx = e.currentTarget.dataset.idx;
        app.globalData.menu_index = idx; //  page_type = this.data.menu_model[this.data.menu_index].url_type

        page_type = this.menu_model[idx].url_type;
        id = this.menu_model[idx].app_url;
      } //判断跳转的类型  1 = 小程序页面，2 = 分类商品，3 = 商品详情 ，4 = 自定义页面 , 5 = 外部网址链接,


      if (page_type == 1) {
        if (obj == 'custom') {
          //要访问的页面idx，当前页面menu_index
          common.totabar(idx, this.menu_index, this.menu_model);
        } else {
          var url = common.meunCheck(e.currentTarget.dataset.url);

          if (url.tab == 1) {
            uni.switchTab({
              url: url.url
            });
          } else {
            uni.navigateTo({
              url: url.url
            });
          }
        }
      } else if (page_type == 2) {
        uni.navigateTo({
          url: '/pages/goods/goodsList/goodsList?cat_id=' + id
        });
      } else if (page_type == 3) {
        uni.navigateTo({
          url: '/pages/goods/goodsInfo/goodsInfo?goods_id=' + id
        });
      } else if (page_type == 5 || page_type == 0) {
        this.setData({
          webUrl: url ? url : id
        });
        uni.navigateTo({
          url: '/pages/index/webview/webview'
        });
      } else {
        //自定义页面      
        this.setData({
          menu_index: id
        });
        this.getAutoData(id);
      }
    },

    /** 默认菜单 */
    topages: function (e) {
      var idx = e.currentTarget.dataset.idx;
      app.globalData.menu_index = idx;
      common.defaultTotabar(idx, 0);
    },
    //新闻详情
    goNewsDetail: function (e) {
      var id = e.currentTarget.dataset.id;
      var link = e.currentTarget.dataset.link;
      var webUrl;

      if (link != '') {
        webUrl = link;
      } else {
        webUrl = "/api/news/news_detail?news_id=" + id;
      }

      this.setData({
        webUrl: webUrl
      });
      uni.navigateTo({
        url: '/pages/index/webview/webview'
      });
    },

    changeGoodsShow(e) {
      var index = e.currentTarget.dataset.index;
      var fid = e.currentTarget.dataset.fid;
      this.block_model[fid]['list'] = this.block_model[fid]['nav'][index]['goods_list'];
      this.block_model[fid]['title_selected'] = index;
      this.setData({
        goods_show: index,
        goods_show_fid: fid,
        block_model: this.block_model
      });
    },

    returnModelArr: function (data, ids) {
      var arr = [];

      for (let i = 0; i < ids.length; i++) {
        for (let l = 0; l < data.length; l++) {
          if (ids[i] == data[l]['div_order']) {
            arr.push(data[l]);
          }
        }
      }

      return arr;
    },

    /** 创建活动倒计时定时器 */
    createActivityTimer: function () {
      var sale = this.sale;
      var that = this;
      this.timer = setInterval(function () {
        var time = sale.good.end_time * 1000 - new Date().getTime() + sale.diffTime;
        var remainTime = util.transTime(time);

        if (time <= 0) {
          // that.destroyActivityTimer();
          that.getAutoData(); //首页数据

          return;
        }

        that.setData({
          'sale.countTime': remainTime
        });
      }, 1000);
    },

    /** 销毁活动倒计时定时器 */
    destroyActivityTimer: function () {
      if (this.timer) {
        clearInterval(this.timer);
        this.timer = null;
      }
    },
    tologin: function () {
      if (!app.globalData.auth.isAuth()) {
        app.globalData.showLoading(null, 1500);
        app.globalData.getUserInfo();
        this.infologin = true;
        return;
      }
    },
    checklogin: function () {
      this.setData({
        iflogin: app.globalData.auth.hadAuth()
      });
    },

    /** 页面滚动事件 */
    onPageScroll: function (e) {
      this.setData({
        scrollTop: e.scrollTop
      }); //可能还在滚动就跳到其他页面去了，导致导航栏变色，所以要判断路由

      var pages = getCurrentPages();

      if (pages[pages.length - 1].route == 'pages/index/customPage/customPage') {
        if (e.scrollTop > 10) {
          uni.setNavigationBarColor({
            frontColor: '#ffffff',
            backgroundColor: '#f95959'
          });
        } else {
          uni.setNavigationBarColor({
            frontColor: '#000000',
            backgroundColor: '#eeeeee'
          });
        }
      }
    },

    bindTimeChange(e) {
      var that = this;
      let fid = e.currentTarget.dataset.fid;
      let idx = e.currentTarget.dataset.idx;
      let datas = that.block_model;
      datas[fid]['nav'][idx]['val'] = e.detail.value;
      this.setData({
        intelligence_date: e.detail.value,
        block_model: datas
      });
    },

    /** 初始化区域弹框相关 */
    initRegions: function (e) {
      var that = this;
      new Regions(this, 'regions', {
        endAreaLevelCall: function (parentId, regionName, address) {
          Object.assign(that.from_address, address);
          that.setData({
            'from_address.province_name': that.from_address.province_name,
            'from_address.city_name': that.from_address.city_name,
            'from_address.district_name': that.from_address.district_name,
            'from_address.twon_name': that.from_address.twon_name
          });
        },
        setFromRegionsVal: function (selected, address) {
          let fid = selected.fid;
          let idx = selected.idx;
          let datas = that.block_model;
          datas[fid]['nav'][idx]['val'] = address.province_name + address.city_name + address.district_name + address.twon_name;
          that.setData({
            block_model: datas
          });
        }
      });
    },
    radioChange: function (e) {
      var that = this;
      let fid = e.currentTarget.dataset.fid;
      let idx = e.currentTarget.dataset.idx;
      let idxs = e.currentTarget.dataset.idxs;
      let datas = that.block_model;

      for (let i = 0; i < datas[fid]['nav'][idx]['option_name'].length; i++) {
        datas[fid]['nav'][idx]['option_name'][i]['selected'] = -1;
        datas[fid]['nav'][idx]['val'] = '';
      }

      datas[fid]['nav'][idx]['option_name'][idxs]['selected'] = idxs;
      datas[fid]['nav'][idx]['val'] = datas[fid]['nav'][idx]['option_name'][idxs]['name'];
      that.setData({
        block_model: datas
      });
    },
    checkboxChange: function (e) {
      var that = this;
      let fid = e.currentTarget.dataset.fid;
      let idx = e.currentTarget.dataset.idx;
      let idxs = e.currentTarget.dataset.idxs;
      let datas = that.block_model;

      if (datas[fid]['nav'][idx]['option_name'][idxs]['selected'] == idxs) {
        datas[fid]['nav'][idx]['option_name'][idxs]['selected'] = -1;
      } else {
        datas[fid]['nav'][idx]['option_name'][idxs]['selected'] = idxs;
      }

      let val = '';

      if (datas[fid]['nav'][idx]['option_name'].length > 0) {
        for (let i = 0; i < datas[fid]['nav'][idx]['option_name'].length; i++) {
          if (datas[fid]['nav'][idx]['option_name'][i]['selected'] >= 0) {
            if (val) {
              val += ',' + datas[fid]['nav'][idx]['option_name'][i]['name'];
            } else {
              val += datas[fid]['nav'][idx]['option_name'][i]['name'];
            }
          }
        }
      }

      datas[fid]['nav'][idx]['val'] = val;
      that.setData({
        block_model: datas
      });
    },
    checkFromType: function (e) {
      var that = this;
      let fid = e.currentTarget.dataset.fid;
      let idx = e.currentTarget.dataset.idx;
      let datas = that.block_model;
      datas[fid]['nav'][idx]['val'] = e.detail.value;
      that.setData({
        block_model: datas
      });
    },
    fromSubmit: function (e) {
      var that = this;
      let datas = that.block_model;
      let fid = e.currentTarget.dataset.fid;
      var data = '';

      for (let j = 0; j < datas[fid]['nav'].length; j++) {
        if (datas[fid]['nav'][j]['required'] == 1 && !datas[fid]['nav'][j]['val'] && (datas[fid]['nav'][j]['type'] == 0 || datas[fid]['nav'][j]['type'] == 1)) {
          return app.globalData.showTextWarining("请填写" + datas[fid]['nav'][j]['title']);
        }

        if (datas[fid]['nav'][j]['type'] == 0 && datas[fid]['nav'][j]['verify_type'] == 1) {
          if (!app.globalData.validatemobile(datas[fid]['nav'][j]['val'])) {
            return;
          }
        }

        if (datas[fid]['nav'][j]['type'] == 0 && datas[fid]['nav'][j]['verify_type'] == 2) {
          if (!common.checkEmail(datas[fid]['nav'][j]['val'])) {
            return app.globalData.showTextWarining("请填写" + datas[fid]['nav'][j]['title'] + '正确的格式');
          }
        }

        if (datas[fid]['nav'][j]['required'] == 1 && !datas[fid]['nav'][j]['val'] && (datas[fid]['nav'][j]['type'] == 2 || datas[fid]['nav'][j]['type'] == 3 || datas[fid]['nav'][j]['type'] == 5 || datas[fid]['nav'][j]['type'] == 4)) {
          return app.globalData.showTextWarining("请选择" + datas[fid]['nav'][j]['title']);
        }

        data += '&name' + j + '=' + datas[fid]['nav'][j]['val'];
      } //验证之后清空数据


      for (let i = 0; i < datas[fid]['nav'].length; i++) {
        datas[fid]['nav'][i]['val'] = '';

        if (datas[fid]['nav'][i]['type'] == 4) {
          for (let y = 0; y < datas[fid]['nav'][i]['option_name'].length; y++) {
            datas[fid]['nav'][i]['option_name'][y]['selected'] = -1;
          }
        }

        if (datas[fid]['nav'][i]['type'] == 5) {
          for (let u = 0; u < datas[fid]['nav'][i]['option_name'].length; u++) {
            datas[fid]['nav'][i]['option_name'][u]['selected'] = -1;
          }
        }
      }

      var from_datas = '?timeid=' + datas[fid]['timeid'] + '&form_name=' + datas[fid]['form_name'] + data;
      request.get('/Api/Index/save_form' + from_datas, {
        data: data,
        failRollback: true,
        success: function (res) {
          app.globalData.showTextWarining(datas[fid]['result'] || '提交成功', function () {
            that.setData({
              block_model: datas
            });
          });
        }
      });
    }
    /****************************** 自定义 end ********************************/

  }
};
</script>
<style>
/* pages/index/customPage/customPage.wxss */
@import "../custom/custom.scss";
page{
    background-color: #fff;
    margin-bottom: 100rpx;
}
.search-box{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 78rpx;
    z-index: 10;

}
.search-fixed{
    background:rgba(242,48,48,0.8);
}
</style>